'''
if 变量名 判断 :
   条件
elif 变量名 判断 :
   条件
else:
    条件
<<<<<<< HEAD
'''

# data = int(input("数字判断："))
# if data > 10:
#     print("AAA")
# elif data == 10:
#     print ("ccc")
# else:
#     print("BBB")


# python 是通过缩进控制逻辑
# 同逻辑的代码必须对其


# data = int(input("数字判断："))
# if data > 10:
#     print("AAA")
# elif data == 10:
#     print ("ccc")
# else:
#     print("BBB")

'''
for 循环

 语法：
for 变量 in 取值列表:
    执行的操作 
'''

 # range(start end)
# for i in range(1,6):
#     print(i)

# for i in range(5):
#     print(i)

#continue 跳过当前循环
# break 中断整个循环

# for i in range(5):
#     if i == 3:
#         continue
#     print(1)

# for i in range(5):
#     if i == 3:
#         break
#     print(1)

#索引
data_07 = "abcdef"
# print(data_07[0])
# print(data_07[3])
# print(data_07[-2])
# print(data_07[-1])

#切片
# 6.切片， 字符串[起始下标:终止下标:步长]

# print(data_07[0:4])
# print(data_07[3:1])
# print(data_07[-2:])
# print(data_07[::-1])

# 1.转换大小写
# print("AbcD".capitalize())
# print("AbcD".upper())
# print("AbcD".lower())

#2.删除字符串左右两侧的空白
# print("         abc        ".strip())

#3.判断字符串开头、结尾
# print("abc".startswith("ab"))
# print("abc".endswith("G"))

#4.分割字符串
# data_02 ="linux unix windows"
# print(data_02.split())
# print(data_02.split()[1])
# data_03 ="172.16.23.42"
# print(data_03.split("."))
# print(data_03.split(".")[-1])


# 5、字符串替换
# data_04 = "abcd"
# print(data_04.replace("c","K"))

# 6.判断字符串组成
# print("1235".isdigit())
# print("ABCD".isupper())
# print("abcd".islower())
# print("abc123".isalnum())